<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Insert title here</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css"
	href="${ pageContext.request.contextPath }/js/css/bootstrap.css">
<script type="text/javascript"
	src="${ pageContext.request.contextPath }/js/js/jquery-1.11.1.js"></script>
<script type="text/javascript"
	src="${ pageContext.request.contextPath }/js/js/bootstrap.js"></script>
<style type="text/css">
table {
	text-align: center;
}

body {
	width: 80%;
	text-align: center;
	margin: 0 auto;
}

.error {
	border: 1px red dashed;
}
</style>
</head>
<br />
<br />
<body>
	<%@include file="/html/nav.html"%>
	<div class="col-xs-7 col-xs-offset-2">
		<div class="panel panel-primary" style="margin-top: 100px">
			<div class="panel-body">
				<table class="table table-bordered" border="1" id="tt">
					<tr>
						<th>课程名</th>
						<th>学生数量</th>
						<th>创建时间</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
					</tr>
					<c:forEach items="${courseList}" var="course">
						<tr>
							<td>${course.courseName}</td>
							<td>${course.shuliang}</td>
							<td>${course.createDate}</td>


							<td><div class="modal" id="modalx${course.courseId}">
									<div class="modal-dialog"
										style="width: 500px; margin-top: 150px">
										<div class="modal-content">
											<form class="form-horizontal" method="post" action="/AAA/edit">
												<div class="modal-header">编辑[ ${course.courseName}
												]课程信息</div>
												<div class="modal-body">
													<div id="do_registe">

														<div class="form-group">
															<div class="col-xs-3 text-right">
																<label for="name" class="control-label">课程介绍</label>
															</div>
															<div class="input-group col-xs-8">
																<input id="name" name="name" class="form-control"
																	required />
															</div>
														</div>
														<div class="form-group">
															<div class="col-xs-3 text-right">
																<label for="re_name" class="control-label">授课老师</label>
															</div>
															<div class="input-group col-xs-8">
																<input id="re_name" name="re_name" class="form-control"
																	required />
															</div>
														</div>

													</div>
													<div class="modal-footer">
														<a href="" class="btn btn-default" data-dismiss="modal">返回</a>
														<button id="registe" class="btn btn-primary">编辑</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div> <a class="btn btn-primary" data-toggle="modal"
								data-target="#modalx${course.courseId} ">编辑</a></td>
							<td><div class="modal" id="modaly${course.courseId}">
									<div class="modal-dialog"
										style="width: 500px; margin-top: 150px">
										<div class="modal-content">
											<div class="modal-header" style="background-color: royalblue">删除确定
												${course.courseName}</div>
											<div class="modal-body">你确定要删除[ ${course.courseName}
												]吗？</div>
											<div class="modal-footer">
												<a href="/AAA/delete?delete=1&courseId=${course.courseId}" class="btn btn-primary">1确认</a>
												 <a href="" class="btn btn-default"  data-dismiss="modal">取消</a>
											</div>
										</div>
									</div>
								</div> <a class="btn btn-primary" data-toggle="modal"
								data-target="#modaly${course.courseId}">删除</a></td>
						</tr>
					</c:forEach>
				</table>
				<a href="searChcourse?page=1">首页</a>&nbsp;&nbsp;<a
					href="searChcourse?page=${page-1}">上一页</a>&nbsp;&nbsp;<a
					href="searChcourse?page=${page+1}">下一页</a>&nbsp;&nbsp;<a
					href="#?page=0">末页</a>
			</div>
		</div>
	</div>

</body>
</html>

